<?php

namespace app\api\model\product;

use app\common\model\product\ProductBrandRelation;
use think\facade\Cache;

/**
 * 商品分类模型
 */
class ProductBrandRelationModel extends ProductBrandRelation
{

    public static function productListByUser($param, $userInfo = false)
    {
        $supplier_id = Cache::get($userInfo['user_id'] . '_supplier_id');
        $list = ProductBrandRelation::listDataByUser($param, $param, [], 'sort_num desc', $supplier_id);
        return $list;
    }

    public static function productList($param)
    {
        $list = ProductBrandRelation::listDataTemp($param, $param, [], 'sort_num desc');
        return $list;
    }
}
